#ifndef COMMON_H
#define COMMON_H

enum ProtocolType{
    PT_NULL = 1000,
    PT_CREATE_ROOM,
    PT_ENTER_ROOM,
    PT_LEAVE_ROOM,
    PT_GET_ROOM_LIST,
    PT_STATUS_SET,
    PT_RESP_CREATE_ROOM,
    PT_RESP_ENTER_ROOM,
    PT_RESP_LEAVE_ROOM,
    PT_RESP_GET_ROOM_LIST,
    PT_RESP_STATUS_SET,
    PT_NOTIFY_CREATE_ROOM,
    PT_NOTIFY_ENTER_ROOM,
    PT_NOTIFY_LEAVE_ROOM,
    PT_NOTIFY_GAME_START
};

//common resturn vaule
#define E_SUCCESS				    0
#define E_FAIL					    -1

#define E_MEMORY				    -1000

//room-related error
#define E_ROOM_NAME_EMPTY                           -1001
#define E_ROOM_EXIST                                -1002
#define E_ROOM_NOT_EXIST                            -1003
#define E_ROOM_NOT_EXIST_OR_WRONG_PASSWD            -1004
#define E_ROOM_ALREAY_IN_ROOM			    -1005
#endif // COMMON_H
